package com.msb.Phone;

/**
 * @author weifuqiang
 * @create_time 2022/6/1
 */
public class Test {
    public static void main(String[] args) {
        Phone phone = new Phone("华为p40", 200.13,2022);
        Phone phone2 = new Phone("华为p40", 200.13,2022);
        System.out.println(phone);
        // == 比较左右两侧的值是否一值 对于引用数据类型，比较的是两个地址值
        System.out.println(phone == phone2);

        // equals比较对象内容是否相等
        boolean equals = phone.equals(phone2);
        System.out.println(equals);


    }
}
